package com.ruoyi.quartz.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.quartz.mapper.YjgCgMainBi1Mapper;
import com.ruoyi.quartz.domain.YjgCgMainBi1;
import com.ruoyi.quartz.service.IYjgCgMainBi1Service;

/**
 * YjgCgMainBi1Service业务层处理
 * 
 * @author SYF
 * @date 2025-05-07
 */
@Service
public class YjgCgMainBi1ServiceImpl implements IYjgCgMainBi1Service 
{
    @Autowired
    private YjgCgMainBi1Mapper yjgCgMainBi1Mapper;

    /**
     * 查询YjgCgMainBi1
     * 
     * @param yongyouCode YjgCgMainBi1主键
     * @return YjgCgMainBi1
     */
    @Override
    public YjgCgMainBi1 selectYjgCgMainBi1ByYongyouCode(String yongyouCode)
    {
        return yjgCgMainBi1Mapper.selectYjgCgMainBi1ByYongyouCode(yongyouCode);
    }

    /**
     * 查询YjgCgMainBi1列表
     * 
     * @param yjgCgMainBi1 YjgCgMainBi1
     * @return YjgCgMainBi1
     */
    @Override
    public List<YjgCgMainBi1> selectYjgCgMainBi1List(YjgCgMainBi1 yjgCgMainBi1)
    {
        return yjgCgMainBi1Mapper.selectYjgCgMainBi1List(yjgCgMainBi1);
    }

    /**
     * 新增YjgCgMainBi1
     * 
     * @param yjgCgMainBi1 YjgCgMainBi1
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public int insertYjgCgMainBi1(YjgCgMainBi1 yjgCgMainBi1)
    {
        return yjgCgMainBi1Mapper.insertYjgCgMainBi1(yjgCgMainBi1);
    }

    /**
     * 修改YjgCgMainBi1
     * 
     * @param yjgCgMainBi1 YjgCgMainBi1
     * @return 结果
     */
    @Override
    public int updateYjgCgMainBi1(YjgCgMainBi1 yjgCgMainBi1)
    {
        return yjgCgMainBi1Mapper.updateYjgCgMainBi1(yjgCgMainBi1);
    }

    /**
     * 批量删除YjgCgMainBi1
     * 
     * @param yongyouCodes 需要删除的YjgCgMainBi1主键
     * @return 结果
     */
    @Override
    public int deleteYjgCgMainBi1ByYongyouCodes(String[] yongyouCodes)
    {
        return yjgCgMainBi1Mapper.deleteYjgCgMainBi1ByYongyouCodes(yongyouCodes);
    }

    /**
     * 删除YjgCgMainBi1信息
     * 
     * @param yongyouCode YjgCgMainBi1主键
     * @return 结果
     */
    @Override
    public int deleteYjgCgMainBi1ByYongyouCode(String yongyouCode)
    {
        return yjgCgMainBi1Mapper.deleteYjgCgMainBi1ByYongyouCode(yongyouCode);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public int clearHisData(){
        return yjgCgMainBi1Mapper.clearHisData();
    }
}
